package control

import (
	"go_stu_gin/service"
	"go_stu_gin/util"
	"log"

	"github.com/gin-gonic/gin"
)

func Login(ctx *gin.Context) {
	sv := service.PublicService{}
	code, res, err := sv.Login(ctx)
	if err != nil {
		log.Println(err.Error())
	}
	util.ReturnJson(ctx, code, err, res)
}

func Download(ctx *gin.Context) {
	sv := service.PublicService{}
	code, err := sv.Download(ctx)
	if err != nil {
		log.Println(err.Error())
	}
	util.ReturnJson(ctx, code, err, "")
}
